/* fonts from https://fonts.google.com/ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&family=Zilla+Slab:wght@400;600&display=swap');

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ==================== */
/* PREVIEW PANEL STYLES */
/* ==================== */

.preview-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.pet-display-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto;
    perspective: 1000px;
}

.pet-display {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.pet-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition);
    pointer-events: none;
}

/* Selection Badge */
.selection-badge {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.selection-badge::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary-color);
}

/* Current Feature Indicator */
.current-feature {
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

.feature-indicator {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.indicator-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.indicator-text {
    font-weight: 600;
    color: var(--dark-color);
    margin-right: 5px;
    font-size: 14px;
}

.feature-name {
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 16px;
}

/* Animation for the indicator dot */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments for preview panel */
@media (max-width: 1200px) {
    .pet-display-container {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .preview-panel {
        width: 100%;
        order: -1;
        padding: 1rem;
    }
    
    .pet-display-container {
        height: 300px;
        max-width: 300px;
    }
    
    .current-feature {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .pet-display-container {
        height: 250px;
    }
    
    .selection-badge {
        font-size: 12px;
        padding: 6px 15px;
        bottom: -12px;
    }
    
    .feature-indicator {
        padding: 8px 15px;
    }
    
    .feature-name {
        font-size: 14px;
    }
}

/* ====================== */
/* EXISTING STYLES BELOW */
/* ====================== */

h1{
    font-family: "Caveat", cursive;
    font-optical-sizing: auto;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input[type="text"],
input[type="submit"],
textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

input[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    font-weight: bold;
    align-self: flex-start;
    padding: 0.8rem 2rem;
}

input[type="submit"]:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Message Styles */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-weight: bold;
}

.message-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message-error {
    background-color: rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* Welcome Page Styles */
.welcome-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}

.welcome-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.welcome-title {
    font-family: var(--font-caveat);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

.welcome-logo {
    max-width: 270px;
    width: 100%;
    height: auto;
    margin: 1rem auto 2rem;
    display: block;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.play-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    border: none;
    cursor: pointer;
}

.play-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* LANDSCAPE LAYOUT - For Computer Screens */
.customize-app {
    width: 100vw;
    height: 100vh;
    display: flex;
    background: #f5f7fa;
    overflow: hidden;
}

.customize-container {
    display: flex;
    width: 95%;
    height: 85vh;
    margin: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Left Panel - Options */
.options-panel {
    width: 30%;
    padding: 2rem;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.feature-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.option-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    transform: translateY(-3px);
}

.option-preview {
    width: 100%;
    height: 120px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.option-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.option-name {
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.option-card.selected .option-preview {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.3);
}

/* Right Panel - Navigation */
.nav-panel {
    width: 30%;
    padding: 2rem;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.nav-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prev-btn {
    background: #f8f9fa;
    color: var(--dark-color);
}

.next-btn {
    background: var(--primary-color);
    color: white;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.instructions {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.instructions h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.instructions ol {
    padding-left: 1.2rem;
}

.instructions li {
    margin-bottom: 0.5rem;
}

/* Top Icons Container */
.top-icons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

/* Help Icon Styles */
.help-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
}

.help-icon:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.help-icon svg {
    width: 20px;
    height: 20px;
    color: var(--dark-color);
}

.help-icon:hover svg {
    color: white;
}

/* Home Icon Styles */
.home-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative; /* Maintain positioning */
  padding: 8px; /* Keep your existing padding */
}

.home-icon:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

.home-icon svg {
  width: 20px;
  height: 20px;
  color: var(--dark-color);
  transition: var(--transition);
}

.home-icon:hover svg {
  color: white;
}

/* Optional: Add click feedback */
.home-icon:active {
  transform: scale(0.95);
}

/* Maintain any existing positioning rules */
.customize-app .home-icon {
  position: relative;
  top: auto;
  right: auto;
}

.welcome-bar {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.welcome-content {
    margin-bottom: 15px;
}

.welcome-content h3 {
    color: #4a4a4a;
    margin-bottom: 10px;
}

.welcome-content p {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.close-welcome {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.close-welcome:hover {
    background-color: #45a049;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Species Page Specific Styles */
.species-app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
    overflow: hidden;
}

.species-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.preview-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pet-preview {
    width: 500px;
    height: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.pet-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.options-section {
    height: 50vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.options-scroller {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem;
    scroll-snap-type: x mandatory;
    flex: 1;
}

.species-option-preview {
    width: 180px;
    height: 120px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
    border: 3px solid transparent;
}

.species-option-preview img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.option-card.selected .species-option-preview {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.3);
}

.option-name {
    font-weight: 500;
    color: var(--dark-color);
    text-align: center;
}

.species-navigation {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-top: 1px solid #eee;
}

/* Hide scrollbar but keep functionality */
.options-scroller::-webkit-scrollbar {
    display: none;
}

.options-scroller {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .welcome-title {
        font-size: 2.5rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .play-button {
        padding: 1rem 2rem;
        font-size: 1.3rem;
    }
}


/* Specific styling for accessories */
#pet-accessory {
    /* Size adjustment - make smaller than base pet */
    width: 60%; /* Adjust this percentage as needed */
    height: auto; /* Maintain aspect ratio */
    
    /* Positioning - center horizontally and adjust vertically */
    left: 50%;
    top: 30%; /* Adjust this to move up/down */
    transform: translateX(-50%);
    
    /* Make sure it's above other layers */
    z-index: 5;
    
    /* Remove padding that might be affecting positioning */
    padding: 0;
}

/* Specific adjustments for different accessories */
#pet-accessory[src*="accessory_bowtie"] {
    width: 30%; /* Bowties are typically smaller */
    top: 60%; /* Position lower on the pet */
}

#pet-accessory[src*="accessory_hat"] {
    width: 55%;
    top: 10%; /* Hats sit higher */
    left: 48%;
}

#pet-accessory[src*="accessory_sunglasses"] {
    width: 45%;
    top: 30%;
    left: 48%;
}

#pet-accessory[src*="accessory_scarf"] {
    width: 35%;
    top: 65%;
}

#pet-accessory[src*="accessory_collar"] {
    width: 25%;
    top: 67%;
    left: 48%;
}

#pet-accessory[src*="accessory_bandana"] {
    width: 25%;
    top: 64%;
}

#pet-accessory[src*="accessory_shoes"] {
    width: 38%;
    top: 68%;
    left: 46%;
}

#pet-accessory[src*="accessory_bib"] {
    width: 20%;
    top: 68%;
    left: 48%;
}